home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Gooey1.3.1
/
C++ Templates
/
mmCommon.h
< prev
next >
Wrap
Text File
|
1995-01-31
|
48KB
|
1,449 lines
$$Message MM Precompile headers, mmHeaders.cp
$$File mmHeaders.cp
/* $CopyRight$ */
/* mmHeaders Type definitions
Name: mmHeaders.cp
Function: Precompile headers for Marksman¬ code.
History: $Date$ Original by $Author$
To add a header, change its "#if 0" to "#if 1".
To remove a header, change its "#if 1" to "#if 0".
THINK C NOTE: You must used 'relaxed ANSI' to do the precompile, strict ANSI will
generate errors.
*/
#ifndef _H_MacHeaders
#define _H_MacHeaders
#if defined(THINK_C) || defined(THINK_CPLUS)
#ifndef __SC__
// set this to 0 (zero) to retain full prototypes
// set this to 1 (one) for "simplified" prototypes
#define SIMPLIFY_PROTOTYPES 0
// prototype checking level
#if SIMPLIFY_PROTOTYPES
#if !__option(check_ptrs)
#undef SIMPLIFY_PROTOTYPES
#endif
#pragma options(!check_ptrs)
#else
#if __option(check_ptrs)
#undef SIMPLIFY_PROTOTYPES
#endif
#pragma options(check_ptrs)
#endif
#endif
#else
#if defined(THINK_C) || defined(THINK_CPLUS)
#pragma pointers_in_D0 // required for c-style toolbox glue function: c2pstr and p2cstr
// the inverse operation (pointers_in_A0) is performed at the end ...
#endif
//
// To allow the use of ToolBox calls which have now become obsolete on PowerPC, but
// which are still needed for System 6 applications, we need to #define OBSOLETE. If
// your application will never use these calls then you can comment out this #define.
//
#define OBSOLETE 1
// Metrowerks-specific Toolbox definitions
//
// These definitions are commonly used but not in Apple's headers. We define
// them in our precompiled header so we can use the Apple headers without modification.
//
#define PtoCstr p2cstr
#define CtoPstr c2pstr
#define CtoPString c2pstr
#define PtoCString p2cstr
#if defined(THINK_C) || defined(THINK_CPLUS)
#define Length(s) (*(unsigned char *)(s))
#endif
#define topLeft(r) (((Point *) &(r))[0])
#define botRight(r) (((Point *) &(r))[1])
#define TRUE true
#define FALSE false
// We need to include this file
#include <MixedMode.h>
long GetCurrentA5(void)
ONEWORDINLINE(0x200D);
#if defined(THINK_C) || defined(THINK_CPLUS)
#pragma pointers_in_A0 // required for c-style toolbox glue function: c2pstr and p2cstr
#endif
#endif
#if 0
#include <ActionAtomIntf.h>
#endif
#if 0
#include <ADSP.h>
#endif
#if 1
#include <AEObjects.h>
#endif
#if 1
#include <AEPackObject.h>
#endif
#if 0
#include <AERegistry.h>
#endif
#if 0
#include <AIFF.h>
#endif
#if 1
#ifdef __APPLETALK__
#include <Aliases.h>
#else
#define __APPLETALK__ // suppress unnecessary #include <AppleTalk.h>
#include <Aliases.h>
#undef __APPLETALK__
#endif
#endif
#if 1
#ifdef __EPPC__
#include <AppleEvents.h>
#else
#define __EPPC__ // suppress unnecessary #include <EPPC.h>
#include <AppleEvents.h>
#undef __EPPC__
#endif
#endif
#if 0
#include <AppleTalk.h>
#endif
#if 0
#ifdef __TRAPS__
#include <Balloons.h>
#else
#define __TRAPS__ // suppress unnecessary #include <Traps.h>
#define _Pack14 0xA830 // (well, mostly unnecessary...)
#include <Balloons.h>
#undef _Pack14
#undef __TRAPS__
#endif
#endif
#if defined(THINK_C) || defined(THINK_CPLUS)
#if 1
#include <BDC.h>
#endif
#endif
#if 0
#include <CommResources.h>
#endif
#if 0
#include <Components.h>
#endif
#if 0
#include <Connections.h>
#endif
#if 0
#include <ConnectionTools.h>
#endif
#if 1
#include <Controls.h>
#endif
#if 0
#include <CRMSerialDevices.h>
#endif
#if 0
#include <CTBUtilities.h>
#endif
#if 0
#include <DatabaseAccess.h>
#endif
#if 1
#include <Desk.h>
#endif
#if 0
#include <DeskBus.h>
#endif
#if 1
#include <Devices.h>
#endif
#if 1
#include <Dialogs.h>
#endif
#if 1
#include <DiskInit.h>
#endif
#if 0
#include <Disks.h>
#endif
#if 0
#include <Editions.h>
#endif
#if 0
#include <ENET.h>
#endif
#if 0
#include <EPPC.h>
#endif
#if 1
#include <Errors.h>
#endif
#if 1
#include <Events.h>
#endif
#if 1
#include <Files.h>
#endif
#if 0
#include <FileTransfers.h>
#endif
#if 0
#include <FileTransferTools.h>
#endif
#if 0
#include <Finder.h>
#endif
#if 0
#include <FixMath.h>
#endif
#if 1
#include <Folders.h>
#endif
#if 1
#include <Fonts.h>
#endif
#if 1
#include <GestaltEqu.h>
#endif
#if 0
#include <Graf3D.h>
#endif
#if 0
#include <HyperXCmd.h>
#endif
#if 1
#include <Icons.h>
#endif
#if 0
#include <ImageCodec.h>
#endif
#if 0
#include <ImageCompression.h>
#endif
#if 0
#include <Language.h>
#endif
#if 1
#include <Lists.h>
#endif
#if 0
#include <MediaHandlers.h>
#endif
#if 1
#include <Memory.h>
#endif
#if 1
#include <Menus.h>
#endif
#if 0
#include <MIDI.h>
#endif
#if 0
#include <Movies.h>
#endif
#if 0
#include <MoviesFormat.h>
#endif
#if 1
#include <Notification.h>
#endif
#if 1
#include <OSEvents.h>
#endif
#if 1
#include <OSUtils.h>
#endif
#if 1
#include <Packages.h>
#endif
#if 0
#include <Palette.h>
#endif
#if 0
#include <Palettes.h>
#endif
#if 0
#include <Picker.h>
#endif
#if 0
#include <PictUtil.h>
#endif
#if 0
#include <Power.h>
#endif
#if 0
#include <PPCToolBox.h>
#endif
#if defined(THINK_C) || defined(THINK_CPLUS)
#if 0
#include <Printing.h>
#endif
#if 1
#include <PrintTraps.h>
#endif
#else
#if 1
#include <Printing.h>
#endif
#endif
#if 0
#include <Processes.h>
#endif
#if 1
#include <QDOffscreen.h>
#endif
#if 1
#include <Quickdraw.h>
#endif
#if 0
#include <QuickTimeComponents.h>
#endif
#if 1
#include <Resources.h>
#endif
#if 0
#include <Retrace.h>
#endif
#if 0
#include <ROMDefs.h>
#endif
#if 0
#include <SANE.h>
#endif
#if 1
#include <Scrap.h>
#endif
#if 0
#include <Script.h>
#endif
#if 0
#include <SCSI.h>
#endif
#if 1
#include <SegLoad.h>
#endif
#if 0
#include <Serial.h>
#endif
#if 0
#include <ShutDown.h>
#endif
#if 0
#include <Slots.h>
#endif
#if 1
#include <Sound.h>
#endif
#if 0
#include <SoundInput.h>
#endif
#if 1
#include <StandardFile.h>
#endif
#if 0
#include <Start.h>
#endif
#if 0
#include <SysEqu.h>
#endif
#if 0
#include <Terminals.h>
#endif
#if 0
#include <TerminalTools.h>
#endif
#if 1
#include <TextEdit.h>
#endif
#if 1
#include <Timer.h>
#endif
#if 1
#include <ToolUtils.h>
#endif
#if 1
#include <Types.h>
#endif
#if 0
#include <Values.h>
#endif
#if 0
#include <Video.h>
#endif
#if 1
#include <Windows.h>
#endif
#if defined(THINK_C) || defined(THINK_CPLUS)
#if 1
#include <pascal.h>
#endif
#if 1
#include <asm.h>
#endif
#else
#if 0
#include <asm.h>
#endif
#endif
#if defined(THINK_C) || defined(THINK_CPLUS)
#if 1 && !defined(__cplusplus)
#include <LoMem.h>
#endif
#if 1
#include <THINK.h>
#endif
#else
#if 1
#include <LowMem.h>
#endif
#endif
#if 0
#include <Traps.h>
#endif
#if defined(THINK_C) || defined(THINK_CPLUS)
#ifndef __SC__
// restore "Check Pointer Types" to previous setting
#if SIMPLIFY_PROTOTYPES
#pragma options(check_ptrs)
#elif defined(SIMPLIFY_PROTOTYPES)
#pragma options(!check_ptrs)
#endif
#undef SIMPLIFY_PROTOTYPES
#endif
#endif
#endif
/* Defined to get around qd. differences */
#if defined(THINK_C) || defined(THINK_CPLUS)
#define screenRect screenBits
#define QDPort thePort
#else
#define screenRect qd.screenBits
#define QDPort qd.thePort
#endif
#include "mmTypes$Prototype.name$.h" /* Marksman types */
#include "Types$Prototype.name$.h" /* User types */
/* ======================================================= */
/* ======================================================= */
$$CloseFile
$$Message MM Types, mm:mmTypes$Prototype.name$.h
$$File mm:mmTypes$Prototype.name$.h
/* $CopyRight$ */
/* mmTypes$Prototype.name$ Type definitions
Name: mmTypes$Prototype.name$.h
Function: Type definitions for Marksman¬ code.
History: $Date$ Original by $Author$
*/
/* ======================================================= */
/* ======================================================= */
/* Basic definitions */
#define NIL 0L /* Used for empty pointers and handles */
/* User event definitions */
#define UserEvent_None 0 /* No user events available */
#define UserEvent_Open_Window 1 /* Open Window or modeless dialog */
#define UserEvent_Close_Window 2 /* Close Window or modeless dialog */
#define UserEvent_Activate_Window 3 /* Activate Window or modeless dialog */
#define UserEvent_Deactivate_Window 4 /* Deactivate Window or modeless dialog */
/* IDs 0 to 999 reserved for Marksman¬, all others available for special use */
/* Menu list resource IDs */
$$Loop Menus
#define Res_Menu_$Menu.name$ $Menu.ID$ /* Menu resource ID, $Menu.FullName$ */
$$Loop MenuItems
#define MItem_$MenuItem.name$ $MenuItem.ID$
$$EndLoop MenuItems
$$EndLoop Menus
$$Loop HierMenus
#define Res_Menu_$Menu.name$ $Menu.ID$ /* Hier Menu resource ID, $Menu.FullName$ */
$$Loop MenuItems
#define MItem_$MenuItem.name$ $MenuItem.ID$
$$EndLoop MenuItems
$$EndLoop HierMenus
/* Window resource IDs, also controls grouped with the appropiate window */
$$Loop Alerts
/* Variables for the alert titled "$Worksheet.FullName$" */
#define ResA_$Worksheet.name$ $Worksheet.ID$ /* Alert, $Worksheet.FullName$ */
$$Loop Control.type = Button
#define ResA_$Control.name$ $Control.ItemID$ /* ...Button, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = StaticText
$$if Control.StandardText
#define ResA_$Control.name$ $Control.ItemID$ /* ...Static Text, $Control.FullName$ */
$$endif
$$if Control.SpecialText
#define sResA_$Control.name$ $Control.StringID$ /* ...Static Text, $Control.FullName$ */
$$endif
$$EndLoop
$$Loop Control.type = Icon
#define ResA_$Control.name$ $Control.ItemID$ /* ...Icon, $Control.FullName$ */
#define ResA_N_$Control.name$ $Control.NormalID$
#define ResA_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = Picture
#define ResA_$Control.name$ $Control.ItemID$ /* ...Picture, $Control.FullName$ */
$$if Control.NonGraphic
#define ResA_N_$Control.name$ $Control.NormalID$
$$endif
$$EndLoop
$$Loop Control.type = UButton
#define ResA_$Control.name$ $Control.ItemID$ /* ...Plugin button, $Control.FullName$ */
#define sResA_$Control.name$ $Control.StringID$
#define ResA_N_$Control.name$ $Control.NormalID$
#define ResA_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = HotRect
#define ResA_$Control.name$ $Control.ItemID$ /* ...HotSpot, $Control.FullName$ */
#define sResA_$Control.name$ $Control.StringID$
$$EndLoop
$$Loop Control.type = Sicn
#define ResA_$Control.name$ $Control.ItemID$ /* ...Sicn, $Control.FullName$ */
#define ResA_N_$Control.name$ $Control.NormalID$
#define ResA_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$EndLoop Alerts
$$Loop Dialogs
/* Variables for the Dialog titled "$Worksheet.FullName$" */
#define ResD_$Worksheet.name$ $Worksheet.ID$ /* Dialog, $Worksheet.FullName$ */
$$Loop Control.type = Button
#define ResD_$Control.name$ $Control.ItemID$ /* ...Button, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Checkbox
#define ResD_$Control.name$ $Control.ItemID$ /* ...Checkbox, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Radio
#define ResD_$Control.name$ $Control.ItemID$ /* ...Radio, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = StaticText
$$if Control.StandardText
#define ResD_$Control.name$ $Control.ItemID$ /* ...Static Text, $Control.FullName$ */
$$endif
$$if Control.SpecialText
#define sResD_$Control.name$ $Control.StringID$ /* ...Static Text, $Control.FullName$ */
$$endif
$$EndLoop
$$Loop Control.type = Icon
#define ResD_$Control.name$ $Control.ItemID$ /* ...Icon, $Control.FullName$ */
#define ResD_N_$Control.name$ $Control.NormalID$
#define ResD_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = Picture
#define ResD_$Control.name$ $Control.ItemID$ /* ...Picture, $Control.FullName$ */
$$if Control.NonGraphic
#define ResD_N_$Control.name$ $Control.NormalID$
$$endif
$$EndLoop
$$Loop Control.type = EditText
#define ResD_$Control.name$ $Control.ItemID$ /* ...Edit Text, $Control.FullName$ */
#define sResD_$Control.name$ $Control.StringID$ /* ...Edit Text, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = ScrollBar
#define ResD_$Control.name$ $Control.ItemID$ /* ...ScrollBar, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = UButton
#define ResD_$Control.name$ $Control.ItemID$ /* ...Plugin button, $Control.FullName$ */
#define sResD_$Control.name$ $Control.StringID$
#define ResD_N_$Control.name$ $Control.NormalID$
#define ResD_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = UToggle
#define ResD_$Control.name$ $Control.ItemID$ /* ...Plugin toggle, $Control.FullName$ */
#define sResD_$Control.name$ $Control.StringID$
#define ResD_N_$Control.name$ $Control.NormalID$
#define ResD_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = UGauge
#define ResD_$Control.name$ $Control.ItemID$ /* ...Plugin gauge, $Control.FullName$ */
#define sResD_$Control.name$ $Control.StringID$
#define ResD_N_$Control.name$ $Control.NormalID$
#define ResD_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = List
#define sResD_$Control.name$ $Control.StringID$ /* ...List, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Popup
#define ResD_$Control.name$ $Control.ItemID$ /* ...Popup menu, $Control.FullName$ */
#define mResD_$Control.name$ $Control.MenuID$
$$EndLoop
$$Loop Control.type = Palette
#define ResD_$Control.name$ $Control.ItemID$ /* ...Palette, $Control.FullName$ */
#define ResD_N_$Control.name$ $Control.NormalID$
$$EndLoop
$$Loop Control.type = HotRect
#define ResD_$Control.name$ $Control.ItemID$ /* ...HotSpot, $Control.FullName$ */
#define sResD_$Control.name$ $Control.StringID$
$$EndLoop
$$Loop Control.type = Sicn
#define ResD_$Control.name$ $Control.ItemID$ /* ...Sicn, $Control.FullName$ */
#define ResD_N_$Control.name$ $Control.NormalID$
#define ResD_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$EndLoop Dialogs
$$Loop Windows
/* Variables for the Window titled "$Worksheet.FullName$" */
#define ResW_$Worksheet.name$ $Worksheet.ID$ /* Window, $Worksheet.FullName$ */
$$Loop Control.type = Button
#define ResC_$Control.name$ $Control.ID$ /* ...Button, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Checkbox
#define ResC_$Control.name$ $Control.ID$ /* ...Checkbox, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Radio
#define ResC_$Control.name$ $Control.ID$ /* ...Radio, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = StaticText
#define sResC_$Control.name$ $Control.StringID$ /* ...Static Text, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = EditText
#define sResC_$Control.name$ $Control.StringID$ /* ...Edit Text, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = List
#define ResC_$Control.name$ $Control.ID$ /* ...List, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = HotRect
#define ResC_$Control.name$ $Control.ID$ /* ...HotSpot, $Control.FullName$ */
#define sResC_$Control.name$ $Control.StringID$
$$EndLoop
$$Loop Control.type = ScrollBar
#define ResC_$Control.name$ $Control.ID$ /* ...ScrollBar, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Icon
#define ResC_$Control.name$ $Control.ID$ /* ...Icon, $Control.FullName$ */
#define ResC_N_$Control.name$ $Control.NormalID$
#define ResC_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = Picture
#define ResC_$Control.name$ $Control.ID$ /* ...Picture, $Control.FullName$ */
#define ResC_N_$Control.name$ $Control.NormalID$
$$EndLoop
$$Loop Control.type = UButton
#define ResC_$Control.name$ $Control.ID$ /* ...Plugin button, $Control.FullName$ */
#define sResC_$Control.name$ $Control.StringID$
#define ResC_N_$Control.name$ $Control.NormalID$
#define ResC_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = UToggle
#define ResC_$Control.name$ $Control.ID$ /* ...Plugin toggle, $Control.FullName$ */
#define sResC_$Control.name$ $Control.StringID$
#define ResC_N_$Control.name$ $Control.NormalID$
#define ResC_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = UGauge
#define ResC_$Control.name$ $Control.ID$ /* ...Plugin gauge, $Control.FullName$ */
#define sResC_$Control.name$ $Control.StringID$
#define ResC_N_$Control.name$ $Control.NormalID$
#define ResC_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$Loop Control.type = Popup
#define ResC_$Control.name$ $Control.ID$ /* ...Popup menu, $Control.FullName$ */
#define mResC_$Control.name$ $Control.MenuID$
$$EndLoop
$$Loop Control.type = Palette
#define ResC_$Control.name$ $Control.ID$ /* ...Palette, $Control.FullName$ */
#define ResC_N_$Control.name$ $Control.NormalID$
$$EndLoop
$$Loop Control.type = Sicn
#define ResC_$Control.name$ $Control.ID$ /* ...Sicn, $Control.FullName$ */
#define ResC_N_$Control.name$ $Control.NormalID$
#define ResC_H_$Control.name$ $Control.HilitedID$
$$EndLoop
$$EndLoop Windows
$$Loop Sounds
#define ResS_$Sound.name$ $Sound.ID$ /* Sound, $Sound.FullName$ */
$$EndLoop
/* ======================================================= */
typedef struct UserEventRec{ /* User Event Record definition */
short ID; /* ID for the type of user event */
short ID2; /* Optionally used, 2nd ID, sometimes used */
long Data1; /* Optionally used, Extra data */
long Data2; /* Optionally used, Extra data */
Handle theHandle; /* Optionally used, Handle */
struct UserEventRec **Next; /* Handle of next event in the list */
}UserEventRec,*UserEventPRec,**UserEventHRec;
typedef struct WindowLocRec{ /* Window location record for Prefs */
$$Loop ModelessDialogs
$$if Worksheet.SavePosition
Rect Loc_$Worksheet.name$; /* Top Left corner of window */
$$endif
$$EndLoop
$$Loop Windows
$$if Worksheet.SavePosition
Rect Loc_$Worksheet.name$; /* Top Left corner of window */
$$endif
$$EndLoop
short Pad; /* Place holder for empty record */
}WindowLocRec;
typedef struct HasRec{ /* Record for Gestalt checks */
Boolean ColorQD; /* Flag for Color QuickDraw being available */
Boolean FPU; /* Flag for Floating Point Math Chip being available */
Boolean AppleEvents; /* Whether AppleEvents are available */
Boolean AliasMgr; /* Whether AliasMgr is available */
Boolean EditionMgr; /* Whether EditionMgr is available */
Boolean NewStdFile; /* Whether HasNewStdFile is available */
Boolean PPCToolbox; /* Whether PPCToolbox is available */
Boolean QuickDraw32Bit; /* Whether 32Bit QuickDraw is available */
Boolean Gestalt; /* Whether Gestalt is available */
}HasRec;
typedef struct FileRec{ /* Record for reading and writing files */
SFTypeList typeList; /* For use in opening files */
SFReply Reply; /* For use in getting file names */
StandardFileReply theStdFileReply; /* For use in getting file names */
short inputRefNum; /* For the input file */
short outputRefNum; /* For the output file */
Str255 inputFileName; /* For the input file */
Str255 outputFileName; /* For the output file */
}FileRec;
typedef struct PrintingRec{ /* Record for printing */
THPrint hPrint; /* Printer record */
Boolean PrinterIsOpen; /* Whether printer is open or not */
short PageCount; /* For adding in page number */
short LineCount; /* For printing */
short PrinterVRes,PrinterHRes; /* Printer resolution */
short MaxPrintCharacters; /* Max characters on one line */
short MaxLines; /* Maximum lines in one page */
TPPrPort pPrPort; /* Printer port */
TPrStatus prStatus; /* Printing status */
short CopyCount; /* Number of copies to do */
}PrintingRec;
/* ======================================================= */
class CmmDisplay{ /* The window, dialog, or alert */
public:
Handle ExtraDataHdl; /* Not used by MM code, dedicated to user code */
virtual void Init(void); /* Initialize the variables */
};
class CmmWindow: public CmmDisplay{ /* The window */
public:
Boolean MultipleInstances; /* True if allow multiple instances */
virtual void Init(void); /* Initialize the window variables */
virtual void Moved(Rect *OldRect,WindowPtr whichWindow); /* The window was zoomed or resized */
virtual void OpenExtras(Ptr theWS);
virtual void CloseExtras(Ptr theWS);
virtual void UpdateExtras(Ptr theWS);
virtual void ActivateExtras(Boolean Do_An_Activate,Ptr theWS);
virtual void HandleExtraButtons(Ptr theWS,ControlHandle theControl,short *UnHiliteValue);
virtual void HandleExtraCheckboxes(Ptr theWS,ControlHandle theControl);
};
class CmmModalDialog: public CmmDisplay{ /* The Modal Dialog */
public:
DialogPtr theWindow; /* Window pointer */
RGBColor WindowBackColor; /* Background window color */
Boolean ExitDialog; /* Flag to exit dialog */
virtual void Init(void); /* Initialize the dialog variables */
virtual Boolean FilterThisEvent(DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
virtual void FilterMouseDown(DialogPtr theDialog,EventRecord *theEvent,short *itemHit,Point MyPt);
virtual void ExtraSetup(void);
virtual void DoItemHit(short *itemHit,Boolean *ExitDialog); /* Let user handle the item hit */
virtual void Exit(void); /* Exit the dialog */
};
class CmmModelessDialog: public CmmDisplay{ /* The Modeless Dialog */
public:
DialogPtr theWindow; /* Window pointer */
RGBColor WindowBackColor; /* Background window color */
Boolean ExitDialog; /* Flag to exit dialog */
virtual void Init(void); /* Initialize the dialog variables */
virtual void Moved(Rect *OldRect,WindowPtr theWindow); /* Moved this window */
virtual void UpdateExtras(void); /* HOOK, allow user update code in */
virtual void OpenExtras(void); /* HOOK, allow user open code in */
virtual void FilterTheHit(short *itemHit,EventRecord *myEvent); /* HOOK, filter events */
};
class CmmAlert: public CmmDisplay{ /* The Alert */
public:
DialogPtr theWindow; /* Window pointer */
Boolean DidFirstTime; /* Flag for first time thru the filter */
RGBColor WindowBackColor; /* Background window color */
virtual void Init(void); /* Initialize the alert variables */
virtual void HandleFirstTime(void); /* Handle setup necessary for first time in */
virtual void DoFirstTime(void); /* HOOK, Handle setup necessary for first time in */
virtual Boolean FilterThisEvent(DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
virtual void DoItemHit(short itemHit); /* HOOK, Handle setup necessary for first time in */
virtual void BringUpAlert(void);
};
/* ======================================================= */
$$Loop Alerts
/* Class for the alert titled "$Worksheet.FullName$" */
class CmmA$Worksheet.name$: public CmmAlert{ /* The Alert */
public:
virtual void Init(void); /* Initialize the alert variables */
virtual void HandleFirstTime(void); /* Handle setup necessary for first time in */
virtual void BringUpAlert(void);
$$Loop Control.type = Button
Boolean Enable_$Control.name$; /* ...Button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = HotRect
Boolean Enable_$Control.name$; /* ...HotSpot global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Icon
Boolean Enable_$Control.name$; /* ...Icon button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
Boolean Enable_$Control.name$; /* ...Picture button global enable, $Control.FullName$ */
$$endif
$$EndLoop
$$Loop Control.type = UButton
Boolean Enable_$Control.name$; /* ...Plugin Button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Sicn
Boolean Enable_$Control.name$; /* ...Sicn global enable, $Control.FullName$ */
$$EndLoop
};
$$EndLoop Alerts
$$Loop ModalDialogs
/* Class for the modal dialog titled "$Worksheet.FullName$" */
class CmmD$Worksheet.name$: public CmmModalDialog{ /* The Modal Dialog */
public:
virtual void Init(void); /* Override, Initialize the Dialog variables */
virtual void FilterMouseDown(DialogPtr theDialog,EventRecord *theEvent,short *itemHit,Point MyPt);
virtual void Refresh(void); /* Update the Dialog */
virtual void BringUpDialog(void); /* Open the Dialog */
$$Loop Control.type = Button
Boolean Enable_$Control.name$; /* ...Button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Checkbox
Boolean Enable_$Control.name$; /* ...Checkbox global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Radio
Boolean Enable_$Control.name$; /* ...Radio global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = ScrollBar
Boolean Enable_$Control.name$; /* ...ScrollBar global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Icon
Boolean Enable_$Control.name$; /* ...Icon button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
Boolean Enable_$Control.name$; /* ...Picture button global enable, $Control.FullName$ */
$$endif
$$EndLoop
$$Loop Control.type = EditText
TEHandle TE_$Control.name$; /* ...Edit Text, $Control.FullName$ */
Str255 TEStr_$Control.name$;
Rect TERect_$Control.name$;
$$EndLoop
$$Loop Control.type = UButton
Boolean Enable_$Control.name$; /* ...Plugin Button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = UToggle
Boolean Enable_$Control.name$; /* ...Plugin toggle global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = UGauge
Boolean Enable_$Control.name$; /* ...Plugin guage global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = List
ListHandle List_$Control.name$; /* ...List, $Control.FullName$ */
Rect ListRect_$Control.name$;
$$EndLoop
$$Loop Control.type = Popup
Boolean Enable_$Control.name$; /* ...Popup menu global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Palette
Boolean Enable_$Control.name$; /* ...Palette global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = HotRect
Boolean Enable_$Control.name$; /* ...HotSpot global enable, $Control.FullName$ */
Rect Rect_$Control.name$;
$$EndLoop
$$Loop Control.type = Sicn
Boolean Enable_$Control.name$; /* ...Sicn global enable, $Control.FullName$ */
$$EndLoop
};
$$EndLoop
$$Loop ModelessDialogs
/* Class for the modeless dialog titled "$Worksheet.FullName$" */
class CmmMD$Worksheet.name$: public CmmModelessDialog{ /* The Modeless Dialog */
public:
virtual void Init(void); /* Override, Initialize the Dialog variables */
virtual void Update(WindowPtr theWindow);
virtual void Open(void);
virtual void Close(WindowPtr theWindow);
virtual void HandleEvent(EventRecord *theEvent,WindowPtr theWindow,short itemHit);
$$Loop Control.type = Button
Boolean Enable_$Control.name$; /* ...Button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Checkbox
Boolean Enable_$Control.name$; /* ...Checkbox global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Radio
Boolean Enable_$Control.name$; /* ...Radio global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = ScrollBar
Boolean Enable_$Control.name$; /* ...ScrollBar global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Icon
Boolean Enable_$Control.name$; /* ...Icon button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
Boolean Enable_$Control.name$; /* ...Picture button global enable, $Control.FullName$ */
$$endif
$$EndLoop
$$Loop Control.type = EditText
TEHandle TE_$Control.name$; /* ...Edit Text, $Control.FullName$ */
Str255 TEStr_$Control.name$;
Rect TERect_$Control.name$;
$$EndLoop
$$Loop Control.type = UButton
Boolean Enable_$Control.name$; /* ...Plugin Button global enable, $Control.FullName$ */
$$EndLoop
$$Loop Control.type = UToggle
Boolean Enable_$Control.name$; /* ...Plugin toggle global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = UGauge
Boolean Enable_$Control.name$; /* ...Plugin guage global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = List
ListHandle List_$Control.name$; /* ...List, $Control.FullName$ */
Rect ListRect_$Control.name$;
$$EndLoop
$$Loop Control.type = Popup
Boolean Enable_$Control.name$; /* ...Popup menu global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Palette
Boolean Enable_$Control.name$; /* ...Palette global enable, $Control.FullName$ */
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = HotRect
Boolean Enable_$Control.name$; /* ...HotSpot global enable, $Control.FullName$ */
Rect Rect_$Control.name$;
$$EndLoop
$$Loop Control.type = Sicn
Boolean Enable_$Control.name$; /* ...Sicn global enable, $Control.FullName$ */
$$EndLoop
};
$$EndLoop
$$Loop Windows
/* Class for the window titled "$Worksheet.FullName$" */
typedef struct $Worksheet.name$Rec{ /* Record for window instance */
WindowPtr theWindow; /* Window pointer */
struct $Worksheet.name$Rec *Next;
Handle ExtrasHdl; /* Not used by MM code, dedicated to user code */
RGBColor WindowBackColor; /* Background window color */
$$if Worksheet.Document
$$if Worksheet.ScrollHorz
ControlHandle ScrollHHandle; /* Scrollbar for horz scrolling */
short ScrollHLeftOffset; /* Offset of control from left side */
$$endif
$$if Worksheet.ScrollVert
ControlHandle ScrollVHandle; /* Scrollbar for vert scrolling */
short ScrollVTopOffset; /* Offset of control from top edge */
$$endif
$$endif
$$Loop Control.type = Button
ControlHandle Ctrl_$Control.name$; /* ...Button, $Control.FullName$ */
Boolean Enable_$Control.name$;
$$EndLoop
$$Loop Control.type = Checkbox
ControlHandle Ctrl_$Control.name$; /* ...Checkbox, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Radio
ControlHandle Ctrl_$Control.name$; /* ...Radio, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = ScrollBar
ControlHandle Ctrl_$Control.name$; /* ...ScrollBar, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Icon
$$if Control.NonGraphic
ControlHandle Ctrl_$Control.name$; /* ...Icon button, $Control.FullName$ */
Boolean Enable_$Control.name$;
$$endif
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
ControlHandle Ctrl_$Control.name$; /* ...Picture button, $Control.FullName$ */
Boolean Enable_$Control.name$;
$$endif
$$EndLoop
$$Loop Control.type = EditText
TEHandle TE_$Control.name$; /* ...Edit Text, $Control.FullName$ */
Str255 TEStr_$Control.name$;
Rect TERect_$Control.name$;
$$EndLoop
$$Loop Control.type = UButton
ControlHandle Ctrl_$Control.name$; /* ...Plugin Button, $Control.FullName$ */
Boolean Enable_$Control.name$;
$$EndLoop
$$Loop Control.type = UToggle
ControlHandle Ctrl_$Control.name$; /* ...Plugin toggle, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = UGauge
ControlHandle Ctrl_$Control.name$; /* ...Plugin guage, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = List
ListHandle List_$Control.name$; /* ...List, $Control.FullName$ */
Rect ListRect_$Control.name$;
$$EndLoop
$$Loop Control.type = Popup
ControlHandle Ctrl_$Control.name$; /* ...Popup menu, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = Palette
ControlHandle Ctrl_$Control.name$; /* ...Palette, $Control.FullName$ */
Boolean Enable_$Control.name$;
short Value_$Control.name$;
$$EndLoop
$$Loop Control.type = HotRect
ControlHandle Ctrl_$Control.name$; /* ...HotSpot, $Control.FullName$ */
Boolean Enable_$Control.name$;
Rect Rect_$Control.name$;
$$EndLoop
$$Loop Control.type = Sicn
ControlHandle Ctrl_$Control.name$; /* ...Sicn, $Control.FullName$ */
Boolean Enable_$Control.name$;
$$EndLoop
}$Worksheet.name$Rec,*$Worksheet.name$PRec;
class CmmW$Worksheet.name$: public CmmWindow{ /* The window */
public:
virtual void Init(void); /* Override, Initialize the window variables */
virtual void InitRecord($Worksheet.name$PRec theWS);
virtual void LocateInstance(WindowPtr theWindow);
virtual void Open(void); /* Open the window */
virtual void Close(WindowPtr theWindow); /* Close the window */
virtual void Resized(Rect *OldRect,WindowPtr whichWindow); /* The window was zoomed or resized */
virtual void Update(WindowPtr whichWindow); /* Update the window */
virtual void Activate(WindowPtr whichWindow,Boolean Do_An_Activate); /* Activate the window */
virtual void HandleButton(WindowPtr whichWindow,ControlHandle theControl); /* Handle a button being pressed */
$$if Worksheet.CheckboxesOrRadios
virtual void HandleCheckbox(WindowPtr whichWindow,ControlHandle theControl);
$$endif
$$if Worksheet.Scrollbars
virtual void HandleScrollBar(short code,ControlHandle theControl,Point myPt);
$$endif
virtual void HandleEvent(EventRecord *myEvent);
$Worksheet.name$PRec ListRecPtr; /* List of instance records */
$Worksheet.name$PRec RecPtr; /* Current active instance */
};
$$EndLoop
class CmmApplication{ /* The Application itself */
public:
virtual void Init(void); /* Initialize the application */
virtual void InitExtras(void); /* HOOK, Extra user initialization */
virtual void Run(void); /* Main event loop */
virtual void TopOfLoop(void); /* HOOK at top of main event loop */
virtual void FilterEvent(Boolean *DoIt,EventRecord *myEvent); /* HOOK, Filter events from the main loop */
virtual void DoHighLevelEvent(EventRecord *myEvent); /* Do an AppleEvent */
virtual Boolean DoActivate(EventRecord *myEvent); /* Handle Activate and Deactivate events */
virtual Boolean DoUpdate(EventRecord *myEvent); /* Handle Update events */
virtual Boolean DoInContent(WindowPtr whichWindow,EventRecord *myEvent); /* Pressed in the content area */
virtual Boolean DoGoAway(WindowPtr whichWindow,EventRecord *myEvent); /* Close a window */
virtual Boolean DoDrag(WindowPtr whichWindow,EventRecord *myEvent); /* Drag a window around */
virtual Boolean DoGrow(WindowPtr whichWindow,EventRecord *myEvent); /* Handle a window resize */
virtual Boolean DoZoom(WindowPtr whichWindow,short code,EventRecord *myEvent); /* Handle a window zoom */
virtual void DoDiskEvent(EventRecord *myEvent); /* Handle disk inserted */
virtual void DoKeyEvent(EventRecord *myEvent); /* Handle key presses */
virtual void Handle_User_Event(void); /* Handle a user event */
virtual void Handle_Extra_User_Event(UserEventPRec theUserEvent); /* Hook, to handle user events */
virtual void DoOSEvent(EventRecord *myEvent); /* Check suspend and resume */
virtual Boolean IsWNEIsImplemented(void); /* See if WaitNextEvent is available */
virtual void OpenSplashWindow(void); /* Open spash or personalization window */
virtual void CloseSplashWindow(void); /* Close spash or personalization window */
virtual void InitAppleEvents(void); /* Init appleEvent handlers */
virtual void Exit(void); /* Exit the application */
virtual void ExitExtras(void); /* HOOK, Extra user exit code */
};
class CmmMenus{ /* The Menu bar handler */
public:
virtual void Init(void); /* Initialize the menus */
virtual void AddExtraMenus(void); /* HOOK, Extra user initialization */
virtual Boolean HandleMenuSelection(short theMenu,short theItem); /* Select a menu */
virtual void EnableTheMenus(void); /* Enable or disable before they are dropped */
$$Loop Menus
virtual Boolean DoMenu$Menu.name$(short theItem); /* Handle this menu list, $Menu.FullName$ */
$$EndLoop Menus
$$Loop HierMenus
virtual Boolean DoMenu$Menu.name$(short theItem); /* Handle this menu list, $Menu.FullName$ */
$$EndLoop HierMenus
};
class CmmPreferences{ /* The Preferences routines */
public:
virtual void Init(void); /* Initialize the variables */
virtual void GetPreferences(void); /* Get prefs from file */
virtual void SetPreferences(void); /* Send out new prefs */
virtual void GetPrefParams(OSType *PrefCreator,OSType *PrefType,
Str255 *thePrefsFilename,long *PrefsRecSize,short *thePrefsFormatRevision);
virtual void ReadPrefsPrivate(short PrefsRefNum); /* Override reading prefs file */
virtual void UGetPreferences(Handle thePrefsH); /* Pull all data from prefs record */
virtual void USetPreferences(Handle thePrefsH); /* Set prefs record before it is written */
};
class CmmFiles{ /* The Files routines */
public:
FileRec Files; /* Reading and writing files */
virtual void Init(void); /* Initialize the variables */
/* Open a file, user selects the file */
virtual Boolean Do_The_Open_File(short NumberOfTypes,short *theVolRefNum,ProcPtr fileFilter,
ProcPtr dlgHook);
/* Save to a file, user selects the file */
virtual Boolean Do_The_Save_File(OSType creator, OSType fileType,Str255 *Prompt,
Str255 *DefaultName,short *theVolRefNum,short *theRefNum,ProcPtr dlgHook);
virtual Boolean Do_The_Select_Volume (FSSpec *theFile); /* Select a volume */
virtual void Close_The_Input_File(void);
virtual void Open_The_File(void);
virtual void Close_The_Output_File(void);
virtual void Save_The_File(void);
virtual void Select_Volume(void);
};
class CmmPrinting{ /* The Printing routines */
public:
PrintingRec Printing; /* Printing */
virtual void Init(void); /* Initialize the variables */
virtual void PageSetup(void); /* Do the page setup */
virtual void PrintJobSetup(void); /* Do the print job setup */
virtual void OpenThePrinter(Boolean *Cancelled); /* Open the printer and driver for use */
virtual void CloseThePrinter(void); /* Close the printer and driver */
virtual void Print_The_Data(void);
};
/* ======================================================= */
/* ======================================================= */
$$CloseFile
$$Message MM Common, mm:mmCommon$Prototype.name$.h
$$File mm:mmCommon$Prototype.name$.h
/* $CopyRight$ */
/* mmCommon$Prototype.name$ Common and Utilitys
Name: mmCommon$Prototype.name$.h
Function: Common for the Marksman¬ specific code.
History: $Date$ Original by $Author$
*/
/* ======================================================= */
/* ======================================================= */
extern CApplication *gApplication; /* The application itself */
extern CMenus *gMenus; /* Menu handler */
extern CPreferences *gPreferences; /* Preferences handler */
extern CFiles *gFiles; /* Files handler */
extern CPrinting *gPrinting; /* Printing handler */
extern UserEventHRec UserEventList; /* User Event record list start */
extern EventRecord myEvent; /* Event record for all events */
extern Boolean WNE; /* WaitNextEvent trap is available */
extern short SleepValue; /* Sleep value for Wait on events */
extern Boolean doneFlag; /* Exit program flag */
extern TEHandle theInput; /* Used in text edit selections */
extern RgnHandle cursorRgn; /* Cursor region for WaitNextEvent */
extern short ReplyMode; /* Reply mode for AppleEvents */
extern Rect tempRect; /* Temporary rect, not for long term use */
extern Str255 sTemp; /* Temporary string, not for long term use */
extern short tempChar; /* Temporary use character */
extern long LTemp; /* Temporary use long variable */
extern short DType; /* Temporary use Type of dialog item */
extern Handle DItem; /* Temporary use Handle to the dialog item */
extern ControlHandle CItem; /* Temporary use Control handle */
extern WindowLocRec theWindowLocRec;
extern Boolean Doing_MovableModal; /* For Movable Modal dialogs */
extern Boolean HoldOffUserEvents; /* Flag for holding off UserEvents */
extern Boolean InTheForeground; /* Flag for running in MultiFinder foreground */
extern HasRec Has; /* Gestalt check results */
extern RGBColor Black_ForeColor,White_BackColor;/* Standard colors */
extern RGBColor DrawingColor; /* Temp drawing color, short life span use only */
extern ProcessSerialNumber gSelfPSN;
extern AEAddressDesc gSelfAddress;
$$Loop Menus
extern MenuHandle Menu_$Menu.name$; /* Menu handle, $Menu.FullName$ */
$$EndLoop
$$Loop HierMenus
extern MenuHandle Menu_$Menu.name$; /* Hier Menu handle, $Menu.FullName$ */
$$EndLoop
extern CmmAlert *gCurrentAlert; /* The current Alert object */
$$Loop Alerts
extern CA$Worksheet.name$ *g$Worksheet.name$; /* The Alert object */
$$EndLoop Alerts
extern CmmModalDialog *gCurrentModalDialog; /* The current Modal Dialog object */
$$Loop ModalDialogs
extern CD$Worksheet.name$ *g$Worksheet.name$; /* The Modal Dialog object */
$$EndLoop
$$Loop ModelessDialogs
extern CMD$Worksheet.name$ *g$Worksheet.name$; /* The Modeless Dialog object */
$$EndLoop
$$Loop Windows
extern CW$Worksheet.name$ *g$Worksheet.name$; /* The Window object that is active */
$$EndLoop
#ifdef __cplusplus
extern "C" {
#endif
/* Prototypes */
pascal Boolean theAlertFilter (DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
pascal Boolean theModalDialogFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
/* Copy Pascal strings */
void PStrCopy(Str255 *SourceString, Str255 *DestString);
/* Concat Pascal strings */
void PStrCat(Str255 *SourceString, Str255 *DestString);
/* Compare Pascal strings for exact match, case sensitive */
Boolean PStrCmp(StringPtr Source1String,StringPtr Source2String);
WindowPtr Mk_BehindWindow(short theLayer); /* Get which window to place us behind */
void Mk_RegisterWindow(WindowPtr theWindowPtr,short theLayer);/* Place layer in RefCon and verify layers */
void Mk_ClearLayers(void); /* Init our arrays for layered windows */
void Mk_HiliteWindow(WindowPtr theWindowPtr); /* Hilite our layered window */
void Mk_DragWindow(WindowPtr theWindowPtr,Point where, Rect bounds);/* Drag our layered window */
Boolean Mk_Is_FrontWindow(WindowPtr theWindowPtr); /* Get the front window */
void Mk_CloseLayeredWindow(WindowPtr theWindowPtr);/* Close a layered window */
void Play_The_Sound(short ResID);
void PositionWindow(WindowPtr theWindow,Point WantLocation,Point DefaultPosition);
/* See if any user events are available */
void GetUserEvent(UserEventPRec TheUserEvent);
/* Add a user event */
void Add_UserEvent(short ID, short ID2, long Data1, long Data2, Handle theHandle);
/* Set the title for a popup control */
void SetNameForPopup(ControlHandle theControl);
/* This is a routine used to make a new list */
void Make_A_List(ListHandle *theList,Rect *theListRect,WindowPtr theWindow,short theStringResourceID,
short theSize,short theFont,Style theStyle,Boolean InDialog);
/* This is a routine used to add strings to an existing list */
void Add_List_String(Str255 theString, ListHandle theList, Point *cSize);
/* This is a routine used to get a string from a TE area, limited to 250 characters */
void Get_TE_String(TEHandle theTEArea, Str255 *theString);
/* This is a routine used to create a TE area */
void Make_TE_Area(TEHandle *theTEArea, Rect *Position,short theFontSize,short theFont,
short DefaultStringID);
/* This is a routine used to plot an Sicn, small 16x16 icon */
void Plot_Sicn(short theSicnID, Rect *Position);
/* This is a routine used to handle a scrollbar */
void HandleWScrollBar(Point myPt,short code,short Increment,short LIncrement,ControlHandle theControl);
/* Setup a dialog or alert item */
void SetupTheItem (DialogPtr theDialog,short ItemID,Boolean SizeIt,Boolean ShowIt,
Boolean EnableIt,Boolean SetTheMax,Rect *thePosition ,long ExtraData ,short StringID );
/* Center a window onto the deepest color screen */
void CenterOnColorScreen(WindowPtr theWindow);
/* Get the deepest color screen rect */
void GetDeepestColorScreenRect(Rect *DeepRect);
/* Alert and Dialog support routines */
void HiliteDefaultButton(DialogPtr theDialog,short theItem);
void CheckKeysInDialog(DialogPtr theDialog,Boolean *valMyFilter,EventRecord *theEvent,short *itemHit);
void SetupNormalControl(DialogPtr theDialog,short theItem,Boolean Enabled,short InitialValue);
void SetupHotSpot(DialogPtr theDialog,short theItem,Boolean MakeHotSpot,long LineWidth,
long ShadowWidth,short MessageResID,Boolean Enabled);
void SetupPlugin(DialogPtr theDialog,short theItem,Boolean Enabled,
long NormalID,long HilitedID,short MessageResID);
void SetupMinMaxValue(DialogPtr theDialog,short theItem,short min,short max,short value);
void SetupPopupMenu(DialogPtr theDialog,short theItem,Boolean Enabled,short theMenuID,short value);
void SetupPalette(DialogPtr theDialog,short theItem,Boolean Enabled,long NumberRows,long NumberCols,
long PalPictureID,long HiliteMethod);
void SetupIconSicn(DialogPtr theDialog,short theItem,Boolean Enabled,
long NormalID,long HilitedID);
void ClearTheRadio(DialogPtr theDialog,short theItem,short *value);
/* Window support routines */
void DrawStaticTextBox(short ResID,Rect *theRect,short Justify,short theSize,short theFont,Style theStyle);
void DrawStaticLine(short ResID,short Left,short Top,short theSize,short theFont,Style theStyle);
void DrawTheTEArea(Rect *theTERect,TEHandle theTE,short theSize,short theFont,Style theStyle);
ControlHandle MakeNormalControl(WindowPtr theWindow,short theResID,Boolean Enabled,short InitialValue);
ControlHandle MakeHotSpot(WindowPtr theWindow,short theResID,Boolean MakeHotSpot,long LineWidth,
long ShadowWidth,short MessageResID,Boolean Enabled);
ControlHandle MakeIconSicn(WindowPtr theWindow,short theResID,Boolean Enabled,
long NormalID,long HilitedID);
ControlHandle MakePlugin(WindowPtr theWindow,short theResID,Boolean Enabled,
long NormalID,long HilitedID,short MessageResID,short InitialValue);
void MakeMinMaxValue(ControlHandle theControl,short min,short max,short value);
ControlHandle MakePopupMenu(WindowPtr theWindow,short theResID,Boolean Enabled,short theMenuID,short value);
ControlHandle MakePalette(WindowPtr theWindow,short theResID,Boolean Enabled,long NumberRows,long NumberCols,
long PalPictureID,long HiliteMethod);
void UpdateTheList(RgnHandle theRgn,ListHandle theList,Rect *theRect,short theSize,short theFont,Style theStyle,Boolean InDialog);
void ClickInTheList(Point myPt,short modifiers,ListHandle theList,short theSize,short theFont,Style theStyle,Boolean InDialog);
void Activate_TE_Area(Boolean InDialog,Point myPt,TEHandle theTE,short textSize,short textFont,Style textStyle);
pascal OSErr DispatchAppleEvent(AppleEvent *message,AppleEvent *reply,long refcon);
OSErr AE_OpenedApplication(AppleEvent *message,AppleEvent *reply,long refcon);
OSErr AE_QuittingApplication(AppleEvent *message,AppleEvent *reply,long refcon);
Boolean MissedAnyParameters(AppleEvent *message);
void AE_OpenThisFile(FSSpec *theFSSpec,short WhichFile,short TotalToOpen);
void AE_PrintThisFile(FSSpec *theFSSpec,short WhichFile,short TotalToOpen);
#ifdef __cplusplus
}
#endif
/* ======================================================= */
/* ======================================================= */
$$CloseFile